'use strict';

var express = require('express');
var controller = require('./vote.controller');

var router = express.Router();

router.get('/', controller.index);
router.get('/:id', controller.show);
router.post('/', controller.create);
router.put('/:id', controller.update);
router.patch('/:id', controller.update);
router.put('/agree/:id', controller.agree);
router.put('/disagree/:id', controller.disagree);
router.patch('/agree/:id', controller.agree);
router.patch('/disagree/:id', controller.disagree);
router.delete('/:id', controller.destroy);
router.post('/:id/start', controller.start);
router.post('/:id/end', controller.end);
router.post('/:id/cancel', controller.cancel);

module.exports = router;
